﻿import service from "@/utils/axios";

// 获取字典数据
export function getDictionaryData(params) {
  return service.get("/support-backend/dict/listChildrenByDictCode", { params });
}
// 文件上传
export function fileUpload(formData, params = { fileType: "01" }) {
  return service.post(`/assets-ms/file/upload?fileType=${params.fileType}&isSecretFile=false`, formData, {
    headers: { "Content-Type": "multipart/form-data" },
  });
}
// export function fileUpload(formData, params = { resourcesType: "OPE", folder: 'product' }) {
//   return service.post(`/assets-ms/file/uploadFrontResource?fileType=${params.resourcesType}&folder=product`, formData, {
//     headers: { "Content-Type": "multipart/form-data" },
//   });
// }
// 获取省市区数据
export function getAreaData(params) {
  return service.get("/support-backend/district/tree", { params });
}
// 获取批量字典数据
export function getMultipleDictionaryData(data) {
  return service.post("/support-backend/dict/listChildrenByDictCodes", data);
}
